package com.wordsay.core;

import com.wordsay.common.Constant;
import com.wordsay.context.Context;
import com.wordsay.entity.OverallAnalystResult;

public class Main {
 
	public static void main(String[] args) throws Exception{
		
		Wordsay wordsay = new Wordsay();
		if(wordsay.parseChatRecord(Context.getInstance().getContextMap().get("wordsPath"), Constant.CHAT_APP_FEIXIN)){
			
			//执行全局分析
			OverallAnalystResult analyRes = (OverallAnalystResult)wordsay.executeOverallAnalyst();
			analyRes.printResult();
			
			long start= System.currentTimeMillis();
			//执行个性分析（针对具体聊天的人）
			//分析单人聊天
			//wordsay.executePersonsAnalyst();
			
			//分析群组聊天
			//wordsay.executeGroupsAnalyst();
			
			//分析讨论组聊天
			//wordsay.executeDiscussionsAnalyst();
			
			System.out.println("analyst hot words and periods spent:"+(System.currentTimeMillis() - start) / 1000+"ms");
			
			start= System.currentTimeMillis();
			//分析人与人的聊天相似度
			//wordsay.executePersonSimilarAnalyst();
			
			System.out.println("analyst person similar spent:"+(System.currentTimeMillis() - start)+"ms");

		}
	}
}
